package com.dtd.market.common;

import java.io.Serializable;
import java.util.List;


/**
 * �������
 * @param <t>
 */
public class BaseService<T extends Serializable> {

	protected BaseDao<T> baseDao;

	public void save(T t) throws Exception {
		baseDao.save(t);
	}

	public void update(T t) throws Exception {
		baseDao.update(t);
	}

	public void delete(T t) throws Exception {
		baseDao.delete(t);
	}

	public T get(Serializable id) throws Exception {
		return baseDao.get(id);
	}

	public List<T> findAll() throws Exception {
		return baseDao.findAll();
	}

	public List<T> findByExample(T t) throws Exception {
		return baseDao.findByExample(t);
	}

	public BaseDao<T> getBaseDao() {
		return baseDao;
	}

	public void setBaseDao(BaseDao<T> baseDao) {
		this.baseDao = baseDao;
	}
}
